Repository navigation
chore(ci): fold node-slot scheduling into the priority scheduler - #5073
Conversation
There was a problem hiding this comment.
Nothing blocking. The comments below are optional suggestions. There is no need to push a fix for them before merging.
Beyond the inline finding, I also checked the rewritten runs-on expressions. The collectivex ',{0},{1},{2}' rewrite and the multinode inputs.node-count path each produce a valid JSON array with exactly one nodes:N entry when the priority scheduler is on. When it is off, both fall back to the plain runner label.
Extended reasoning...
The change touches the self-hosted runs-on label expressions in five GPU workflows and the runner setup doc. It touches no auth, injection or data-exposure surface. One finding was reported inline. This note only records the expression checks that came out clean.
| If `PRIORITY_SCHEDULER_ENABLED` is disabled, workflows omit `nodes:N`, `ci-job-*`, | ||
| and `ci-attempt-*` and target the plain runner label. The priority score also |
There was a problem hiding this comment.
🟡 (optional) Once operators delete NODE_SLOT_SCHEDULER_ENABLED as the rollout says, reruns of pre-merge runs and dispatches from unrebased branches queue without nodes:N and never start. Those runs read the old templates, which add nodes:N only when that variable is 'true'. Their fallback array is ["self-hosted",runner,ci-job-*,ci-attempt-*]. AGENTS.md:86 says a job without nodes:N can never be admitted. Fix: keep the variable set to 'true' until no run can still read an old template, and say so in RUNNER_SETUP.md. That means outliving the 30-day rerun window and every branch that still has the gated runs-on.
Why this was flagged
The PR description's rollout says to run gh variable delete NODE_SLOT_SCHEDULER_ENABLED after merge. A rerun of a run started before the merge uses that run's original workflow commit but reads vars when it reruns. In the base benchmark-tmpl.yml and benchmark-multinode-tmpl.yml, and in profile.yml, speedbench-al.yml and collectivex-sweep.yml, the vars.NODE_SLOT_SCHEDULER_ENABLED == 'true' branch is false once the variable is deleted. The || fallback then emits a label list without nodes:N. Manual workflow_dispatch of e2e-tests.yml, profile.yml or speedbench-al.yml from a feature branch cut before this merge hits the same path. AGENTS.md:86 says such a job is ineligible for priority scheduling and labels cannot be added later, so it stays queued until it times out. On the base branch, with the variable left at 'true', these jobs carry nodes:N and get admitted. Nothing in the repo warns operators to wait before deleting the variable.
Verification: Trigger: an operator deletes NODE_SLOT_SCHEDULER_ENABLED as the PR's Rollout section says. AGENTS.md:86 (base, unchanged) says: "A queued job without the label is ineligible for priority scheduling, and labels cannot be added later". The diff also drops the variable from RUNNER_SETUP.md:207-208, so no doc tells operators to keep it until old runs age out.
Picks up the priority-scheduler change (#5073) so sweep jobs carry the nodes:N runner label. Conflict in perf-changelog.yaml resolved by keeping main's entries and this PR's entry last. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Summary
Node-slot admission (the
nodes:Nrunner label andci-lease-*leases) was gated behind a separateNODE_SLOT_SCHEDULER_ENABLEDrepo variable on top ofPRIORITY_SCHEDULER_ENABLED. The priority controller already supportsnodes:Nandci-lease-*, and every priority-scheduled job must carrynodes:Nto be eligible, so the second flag no longer has a valid "off" state.This change makes
PRIORITY_SCHEDULER_ENABLEDthe only switch.true, every self-hosted job requestsnodes:Ntogether with itsci-job-*andci-attempt-*labels.true, jobs target the plain runner label, as before.operatorx-sweep.ymlalready worked this way and is unchanged.Changes
benchmark-tmpl.yml,benchmark-multinode-tmpl.yml,profile.yml,speedbench-al.yml: remove theNODE_SLOT_SCHEDULER_ENABLEDbranch and the label list that omittednodes:N.collectivex-sweep.yml: always includenodes:{matrix.nodes}when the priority scheduler is enabled.RUNNER_SETUP.md: describe node leasing as part of the priority scheduler and drop the separate flag.Rollout
After merge, delete the now-unused repo variable with
gh variable delete NODE_SLOT_SCHEDULER_ENABLED. Deleting it before merge would make the old workflows onmaindropnodes:Nfrom queued jobs.Testing
NODE_SLOTreferences remain in the repo.runs-onexpressions.